package com.alameda.controller.v1.info;

import com.alameda.common.result.Result;
import com.alameda.info.dto.JobInfoDTO;
import com.alameda.service.info.JobInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 定时任务信息 前端控制层
 *
 * @author Lv
 * @date 2024/06/10
 */
@Api(tags = "定时任务信息")
@RestController
@RequestMapping("/xxl_job_info")
public class JobInfoController {

    @Autowired
    private JobInfoService jobInfoService;

    /**
     * 查询定时任务信息
     *
     * @param jobInfoDTO 定时任务信息查询对象
     * @return
     */
    @ApiOperation("查询定时任务信息")
    @PostMapping("/list_job_info")
    public Result<?> listJobInfo(@RequestBody JobInfoDTO jobInfoDTO) {
        return Result.success(jobInfoService.listJobInfo(jobInfoDTO));
    }
}

